package com.easy.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Date;
import java.text.SimpleDateFormat;

@Data
public class ManagerBean {
    private String manager_id;
    private String manager_name;
    private String phone;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date work_date;
    private String log_code;
    private byte state;
    private int id;
    public String getWork_date(){
        if(work_date==null) return null;
        return new SimpleDateFormat("YYYY-MM-dd").format(work_date);
    }
}
